//
//  UIButton+WDExtention.h
//  MyDemos
//
//  Created by iMac on 2018/3/13.
//  Copyright © 2018年 iMac. All rights reserved.
//

#import <UIKit/UIKit.h>


#define Button() [[UIButton alloc] init]


NS_ASSUME_NONNULL_BEGIN
typedef UIButton *_Nullable(^nomalTitle)(NSString * _Nullable title);
@interface UIButton (WDExtention)



/// set title&color nomal
- (UIButton *(^)(NSString *, UIColor *))sNomalTitleColor;
/// set title nomal
- (UIButton *(^)(NSString *))sNomalTitle;
/// set title nomal
- (UIButton *(^)(UIColor *))sNomalColor;



/// set title&color selected
- (UIButton *(^)(NSString *, UIColor *))sSelectedTitleColor;
/// set title selected
- (UIButton *(^)(NSString *))sSelectedTitle;
/// set color selected
- (UIButton *(^)(UIColor *))sSelectedColor;




/// set title&color highlighted
- (UIButton *(^)(NSString *, UIColor *))sHighlightedTitleColor;
/// set title highlighted
- (UIButton *(^)(NSString *))sHighlightedTitle;
/// set color highlighted
- (UIButton *(^)(UIColor *))sHighlightedColor;




/// set image normal
- (UIButton *(^)(NSString *))sNomalImage;
/// set image selected
- (UIButton *(^)(NSString *))sSelectedImage;

/// set image highlighted
- (UIButton *(^)(NSString *))sHighlightedImage;




/// set backgroundColor
- (UIButton *(^)(UIColor *))sBGColor;




/// set backgroundImage nomal
- (UIButton *(^)(NSString *))sNomalBGImage;
/// set backgroundImage selected
- (UIButton *(^)(NSString *))sSelectedBGImage;
/// set backgroundImage highlighted
- (UIButton *(^)(NSString *))sHighlightedBGImage;




/// set backgroundImage(color) nomal
- (UIButton *(^)(UIColor *))sNomalBGColorImage;
/// set backgroundImage(color) selected
- (UIButton *(^)(UIColor *))sSelectedBGColorImage;
/// set backgroundImage(color) highlighted
- (UIButton *(^)(UIColor *))sHighlightedBGColorImage;



/// set frame
- (UIButton *(^)(CGRect))sFrame;
/// set tag
- (UIButton *(^)(NSInteger))sTag;
/// set sys font size
- (UIButton *(^)(CGFloat))sSysFont;
/// set sys font size
- (UIButton *(^)(CGFloat, NSString *))sSysFontName;










/// banding touchupInset
- (UIButton *)touchupInset:(nullable id)target action:(nonnull SEL)selctor;
/// banding valueChanged
- (UIButton *)valueChanged:(nullable id)target action:(nonnull SEL)selctor;



@property (nonatomic, copy) void(^callBack)(UIButton *sender);
/// touchupInset 回调
- (UIButton *)tap:(void(^)(UIButton *))callBack;
/// valueChanged 回调
- (UIButton *)valueChange:(void (^)(UIButton *))callBack;

NS_ASSUME_NONNULL_END
@end
